import Vue from 'vue';

const app = {
  state: {
    openId: '',
    token: '',
    userId: '',
    address: {},
	},
    mutations: {
	  inopenId(state, payload) {
		  state.openId = payload;
    },
    intoken (state, payload) {
		  state.token = payload;
    },
    inuserId (state, payload) {
		  state.userId = payload;
	  },
    inAddress (state, payload) {
		  state.address = payload;
      window.localStorage.setItem('address', JSON.stringify(state.address));
	  },
	  
	}
};

export default app;
